package timing.ukulele.third.msgChannel.action.recall;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import timing.ukulele.third.msgChannel.handle.HandlerHolder;
import timing.ukulele.third.msgChannel.model.RecallTaskInfo;

/**
 * 撤回消息，路由到对应的渠道下发消息
 *
 * @author zh
 */
@Service
public class RecallMessageDirectAction {

    @Autowired
    private HandlerHolder handlerHolder;

    public void process(RecallTaskInfo recallTaskInfo) {
        Integer sendChannel = recallTaskInfo.getSendChannel();
        handlerHolder.route(sendChannel).recall(recallTaskInfo);
    }

}
